package com.lagou.service.impl;

import com.lagou.service.UserService;
import org.apache.dubbo.rpc.RpcContext;

/**
 * <h1>用户服务实现类</h1>
 * @author yzh
 */
public class UserServiceImpl implements UserService {

    @Override
    public String sayHello(String name) {
        String consumerIP = RpcContext.getContext().get("CLIENT_IP")+"";
        String result = "用户服务调用成功,客户端的IP地址为:"+consumerIP;
        System.out.println(result);
        return result;
    }
}
